package com.test.www;

import static java.lang.Integer.*;

public class Point<T> {
    private T x;
    private T y;

    public T getX() {
        return x;
    }

    public void setX(T x) {
        this.x = x;
    }

    public T getY() {
        return y;
    }

    public void setY(T y) {
        this.y = y;
    }

    public Point(T x, T y) {
        this.x = x;
        this.y = y;
    }

    public static <Integer> void translate(Point<Integer> p) {
        p.setX((Integer) valueOf((int) p.getX() * 2));
        p.setY((Integer) valueOf((int) p.getY() * 2));

    }

    public static void main(String[] args) {
        Point<Integer> P = new Point<>(12, 18);
        Point.translate(P);
        System.out.println(P.getX() + " " + P.getY());
    }
}
